better category handler