modify cards to defense, and add tests