add type property and validation