with thanks to Ian Nannestad