added avatar code