fix match and added test