extracted util methods