updated: middleware delegate