moved functions change params
moving stuff outside
Saving computed kp and features