added practice with var scope