Updated code to be compatible with version 1.0 of the toolchain