copied over from patrick's ftp