added some validation

validating data members