added styles and message logic