updating replace stuff
fixed replace problem