try to get the right type