made accurate end game calculation