compiles with clang on linux, but does not work. still investigating..