Added category logic