adding better comment and arrayifying the find-replace