checked in the first draft of the krr code