added escape special characters method