Taking a stab at the category
Refactored to be a bit more elegant