HW_3. algorithm is changed to algo that usues components