Feature/algoritme rework