Added algorithm section