simplify handler()