fixing the compile errors
object oriented design