Changed StatCollector

Added a new function