scope code example