attempt to cut cards
updates cipher code after dodgy merge