add implementation code to stable marriage problem.