adding upload funtionality