generateEnds