replace s-space with jgrapht.