added scope function