Reimplement p002 with goroutines and channels