added flatten test