added ui handler to display messages