remove unnecessary formulae