little refactor (rename typ to category)