Revert "Revert "merging with upstream""

This reverts commit 54c99fa195f96a10d4b41269770931ac3909c306.