fixing token type helper