modified for KHM