Made SReplace take an optional user argument