still ugly code,because ftp is not the same as http/https