xificurk Improved algorithm