remove unnecessary rules