update view.lua to make it work