change middleware