Updating ranGen() to work without busyRun() in loops