Added algorithm logic