added compatibility for msvc