graph query version 2