some util code