pad size add and remove segment
merge with master, conflicts solved