fix sub return, add multiple replacement ability