class states now encapsulate the strategy design pattern