updated nir's changes