included logic in model