append/prepend refactoring