add some useful  functions