some improvements in formula