Used channels instead of for loop