implementation of naorpinkas