Add basic replacement algo