Code analyses both scan and non scan dataset