finished work on stat module