paste function implemented