snprintf replaced, because not supported for vc8(?)