add some useful routines