mandatory fields functionality added