cleaned up interface to make it easier to collect stats