clean up some codes