added KM stuff