inspiration from here and elsewhere