compiles and links correctly