This is a change apported to Mary branch