low-level code for feature regression models