add setupGraph in init func