adjust code for clang