partial merge from  9d71c30d4e9ee815d8ed1a37b384fe95c9d93e33