renamed some functions.