updated graphio to handle inverse graph. Fixed infinity loop in CtaExpand.