added vartype to input validation