An algorithm that does