Strategy design pattern used