better naming of upload function