cleans up threading; adds delay to cuke to avoid race conditions