tweak some functions