graph operations, better implicits