a realization of KMP