adding "upload" function