separate end message from logic