reorganized to the object-oriented paradigm