added query graveyard functionality