code some util