remove unneeded codes