updated to fix clang compiling issues