old version of formulaParse, about to rewrite