check if all parens match; broken on edge cases