small changes in formula and condition directive