add flatten
mv files, add defines