clang did not like initializing from a function