working on graphs