Compiling version with functions