add some useful funtion