refined modal function to accomdate .modal-message in bootstrap 3