not sure what is the validate function for? is it only for unit test purpose?