added some functions, not yet merged