Implementation of _stats

cbugg: close bug-448