added ad-hoc code to get function usage frequency