add feature check middleware