add support for 'type'