change lm_wrapper loading and inheritance