changed message
added subscription to stats
cleaning code
global stats functions