some changes in main.lua