rewrite comment removal code