add changes from Devdatta