made the remote query work