Removing sampling code from granularity controller