toJSON method and cat model