added ftp functionality, implemented xhr