use std::to_string for string conversion
cleanup util.cc a bit