Changed so it compiles and made it simulate