added spec to test deep flattening functionality