starting do organize combatviewer  into functions