added avatar saving