added AJAX validation