- made graph generic