card magic routines