refactored ftp_library