intermediate - algorithm update