Completed code for a single card. This was part of a joint effort