modify some unnecessary code

delete some unnecessary code and simplify