updated player.lua and main.lua