Improve locals example