refactor for @type