added ability for avatars and upgraded to 4.0+