replace snippet