expanded helper function construct for clang