implemented NIK generation