added some functions.