few fixes
- indexes unification
- 2 types of algorithm
- typos fix