copied from upstream master - master should now be identical to upstream master