better support for scalar types