Some more semi-pseudo-code