add customize middleware