clean up the un-used codes
bug fix