define function on every function