Testing speeding up of the code