compiles and links but doesn't work