return avatar object by pointer instead of by reference