previous implementation locks after a random amount of time, testing another option