Started implementing upload function