New correct cost function in Stable Marriage