make find_unused_uid more understandable