Added logic for t = 0, 1 of AKS.