take out device query