add some useful functions