switch between categories when a new one is chosen