experimental; fixes replace()