init common functions