merged emmanuel's changes