    args = {...}
     
    if args[1] == nil then
      return print ("usage: "..shell.getRunningProgram().." <filename>")
    end
     
    check = string.sub(args[1], 1, 7)
    if check == "http://" then
      args[1] = string.sub(args[1], 8, #args[1])
    end
     
    http.request("http://play.smtgames.com/dl/"..args[1]..".lua")
    event,url,source = os.pullEvent()
    if event == "http_success" then
            text = source.readAll()
            if fs.exists(args[1]) then
                    fs.delete(args[1])
            end
            file = fs.open(args[1], "w")
            file.write(text)
            file.close()
            print("downloaded as "..args[1])
    elseif event == "http_failure" then
      print "error"
    end