make sure we use the value of 'type' for the object key instead of the
literal word