udated player script, based on feedback from Elad