REFACTOR nested transaction in customer mapping with addidion of counters