use finalhandler for final response handling