improving oo model for assigment 2