consolidate else if in avatarTool