some basic locals handling; seems to work a tiny bit