added the upload function and added more input fields