declare nodemap as a local var