comparing oop with non-pop solution