merged with upstream master