initial import of working code for regression (classification still needs to be checked / debugged)