added POD, re-implemented algorithm, yet again