function for pop and training category