generated models and added relationship statements