Adding and changes to max_matching