use granularity from config