Now it computes with threads