Moved some logic to the model