changed some matlab