refactored NFC handling