some useful functions to remember