Mayank:query modified according to node structure