checking and validating