done adding mifare, lots of optimizations still needed