added some additional common functions