reconstruction and add length counting