added inversion with Graph