corrected learning algorithm