revising stats logic