remove some unnecessary codes.