revision 3

Added subgraph and printgraph methods