implemented another naive simplifier