complete refactor to beta contract scheme