implement accounting loggic for granular