separating model from db