Regr implemented but not correctly

Added self-checking capability, but is calculating incorrectly