add type verification