Also that bonus pseudo-code