resolved problem with local function
problem with edit item, to resolve!