local code improvements