port some changes