first implementation of share query functionality