Added flatten_extra