length type conversion