changed stop to chan struct{}