added syncronous code to query for hidden edges