added stats collection