add schema validator and tests