update example duplicated code on code climate