Added algorithm