- added a wait loop for lmm mounting
- re-organized the main loop for kf