making more object oriented