updated equation parser