added validation for the input data