updating to use NANv1.0.0 api
fix error message