Added Angelo's code, compiling version.