Merged Irene's Code