@henroo84: The algorithm