added model tests and fixed migration