refactored the cypherbuilder