} else {
                    // convert array to string using join
                    var message = '';
                    if (typeof response.message == 'undefined' || !response.message || response.message.length === 0) {
                        message = response.messages.join('<br>');