remove sleeping because it doesn't really solve the race condition