improve way of resetting category