Changed into Object Oriented Design