remove some unnecessary codes