More work on generic nfindr function