a sloppy version, but it compiles & links properly