Updated to reflect latest version of code