stats calculations initial commit