should return perfect matching in front