another algorithm that works