Updated for MSVC