some edituions
new implementation without optimizations for parallel methods