add type  validation to validator + cleanup