add repeat-end