One implementation of costTracking