added note on number of repetitions to take best result from
commented example implementation