displaying messages correctly