updated file upload, still not fully working