common functions defined