fixes and changes incorporated