Reduce code in near to market example