added edit_item, fixed up other code