replaces append method with prepend