Revert "removed scope functions"

This reverts commit a0e865441db83bedebdc963ef83f3abaf3f4f685.
readded scope functions without $