add Strategy Pattern code