using type conversion to make sure i conform to my type spec