fixed a len-1 corner case in shuffle, and added x_ method tests