logic to total stars