manual merge of @keithamus input