add some validation checks