before cleaning up unused NFC code
reorganized the code