Updated for arbitrary dimensions in x (no output)
Merge remote-tracking branch 'origin/master'