use the rtype framework instead of isscalar