Added code for Strategy Pattern