migration
a lot of fixes