Oprimized code

- used single quotes instead of double quotes
- removed self from method 'replace_pattern'