implement some useful methods