Updated to latest version of code