Recoding the avatar class