split up main for nacl verison