added paperclip function