added functionality to calculate league tables against top and bottom half