get the right type