added multi-location support via query