Added uploading function