fixing replace syntax