conditional transform ep middleware into different style