remove unnecessary codes