Improved a function.