Updated to use the new card API