adaptation + merge with chefchef-master