oop and algorithms