Updated code with the tweaks from Imagine RIT