an attempt to go back to my goroutine version