clean useless code
adjust code, find bugs