added scope around modalDialog library