final folding to boundary box