paperclip implementation