add some common functions