WIP: refactor beta