Rewrite the neo4j insert code using promises