removed bugs in the classes
merged