moved sendMessage functions to array for dismiss button