Updated the code so it compiles