working on traversing graph