add functions for uploading image