merge the pushLines and pushFaces functions