added upload avatar function