added a module planarity which can check if a graph is planar