Updated NIS code

I updated and added NIS code.