move expand/contract logic to mesh
allow query selector to match arbitary attributes