ported annealing thomson example