added replacment for matching pattern