merged Nilans changes