add specs for cards controller, then refactor