Change to be type middleware