implement graph class and pass test, rename node.h