Redid helper-function to take simplification into account.