trying to fix variables override
dded logging