periodicPosition: had unlikely bug
monteCarlo now works with periodic boundaries