first version for sentence to formula