added some utility func