added upload and some other fixes
main fixed