fixing the equation parser to handle negative numbers input