cherry-picking Foundation bits