Implemented the Strategy pattern