code cleanup in canScramble method