remove legacy bits