trying to remove locks completely from PNF implementation