go over apostles algorithm