merged Selva's changes