adjusting paperclip code