fix all bugs in main classes and begin to fix helper class