A fair bit of work must have gone into this...