Statistcs some logic changes