more code, upload not working yet