Simplify this function.