working on regression common regression calculation framework