paperclip updated code