testing an implementation for nbc, this should be slightly fast, if not incorrect