changes suggestd by Amin