bulid graph