refactor controller.js so that cats are not hardcoded into the code