with end listener