apply OOP and Open Closed Principle(OCP)