Added n-1 parsing in formula