Simplified a function.