implemented CNP checking