parse and solve equations