working on object orientation, code seems to be fine