add in stats functions