Move some logic to the entity