example changed to use general RANSAC framework