improvement with graph functionality