made a more object oriented