Making getValue method for scope example simpler