flattening working.
freeing...