refactored the composite method to use the strategies