Refactored code such that it is a progressive code path