added too late counting logic