Francesca’s algorithm