add latest changes to legacy branch