better formula parsing