finished loop cypher code