updated comment for category function