move logic to modelbase