ported to vs2013