#13 added datatypes to flatten