Added flatten test