Trying to figure something out, pay no attention. Uses code from the excellent Rain egg by Niek Blankers. Thanks Niek!