added some validation checks