working on how scope is implemented