code doesn't segfault