moved some statements around, and added kcall1 and mkkern1