delete unnecessary code
fix unit testing