optimize catlines and add cypher