adding uploading functionality