Working version only for 1 processor. Bug fix needed