compiling with optimization works