A new implementation of attribute formula calculate