wrote models and migrations