updating upload fn