reoved unneccessary second replacement, and escaped brackets