handle appends & prepends