add -max_collected flag