adding nifwrite