utilities implement by C