move dice and cli into util