added scope value extraction