replace end-by by endby