implemented ajax validation