trackUsage function moved to its own file