cleaned up device searching