updated oop to incorporate better structure