add scope and advances expression, should be a middleware though