refactoring of equations parser, now it is a class