refactored cards controller and added form partial