moved implementation in util.hpp > util.cpp