add validate
Refactaring spec