made `type` a standalone macro