update item mirror code to be more dry