Now should work AND compile
Thanks swarage for figuring out that pointer thing and other errors