completed online learning algorithim by using standard algorithm