delete unnecessary codes