-       char cmdp = param_getchar(Cmd, 0);
-       if ( cmdp == 'H' || cmdp == 'h' ) return usage_legic_info();
-       
+int legic_print_type(uint32_t tagtype, uint8_t spaces){
+       char spc[11] = "          ";
+       spc[10]=0x00;
+       char *spacer = spc + (10-spaces);
+
+       if ( tagtype == 22 )    
+               PrintAndLog("%sTYPE : MIM%d card (outdated)", spacer, tagtype);
+       else if ( tagtype == 256 )
+               PrintAndLog("%sTYPE : MIM%d card (234 bytes)", spacer, tagtype);
+       else if ( tagtype == 1024 )
+               PrintAndLog("%sTYPE : MIM%d card (1002 bytes)", spacer, tagtype);
+       else
+               PrintAndLog("%sTYPE : Unknown %06x", spacer, tagtype);
+       return 0;
+}
+int legic_get_type(legic_card_select_t *card){
+
+       if ( card == NULL ) return 1;
+