upload functionality updated