Redesign put_item method