added derivative tracking and improved statistics