clean up handler using map deconstruction