Adding custom append and replace methods.