cypher refactoring