code to run on naf