make validate() public