Translating word problems to equations