fixed bug. replace is now sub