added undirected graph support

Added:
- fixed printing
- new test graph
- passing by reference