changes are made according to the suggesstions on PR#4172