add common functions