Developed using Double dispatch pattern