builds and runs (without segfault in linux)