made second path more efficient