added prepend option
added the append option