Modify to use a goroutine