Integrating roger's Code changes