Now using range on select instead on relying on err variaboe to notigy goRoutine that channel has been closed and that its time to end goRoutine.