moved the if-elsif-else logic inside block for when there is leading player