ca foundation permutations revision