added some functions that should probably be there