pns unit testing and fixes done