changing total records calculation