update code due to changes in beta5