some validation and testing