clear unnecessary codes