query devices works