added some helper funcs