system size loop introduced
code structure improved
added method to compute spatial correlation