removed metadata output loop, using flat() instead