cleaning up some codes