Refactor methods with permutation.