fixed algorithm
...