implement file upload and download
add assign function