Added onlyEdges parameter with added test