setup km.c for further analysis