added migration and more tests