started permutation stuff