got simplify working mostly correctly