refactored obtaining next available loop device