common utilities in cpp