update useage of static middleware