should move calls to riothelper into model