finished a function.