add validation and coercion