add local keyword
original version