refactoring to add concepts of line choices and key choices