Added functions to util.hpp