add statistics gathering