Adding hungarian algorithm