move messages into html elements