add validateData method