create a commandTypeChoice extract method