separated category function from panel generator