implemented prepend and append