updating oop approach