removed unnecessary goroutine and channel