implemented item replacement