several updates to card engine