refactored avatarcontrol -- less code duplication