Not the best code, it is just code that works, but it is not parallel or optimized for our processor (CPU)