alg3

Lines labelled with ### aren't written in correct code but act as
placeholders for what the line will have to do, the other lines are
written in proper code.