refactoring transformations in graph module