some util methods