added zrdn algorithm