need to revise kma_rm.c and DOC
final