state validation is more readable