memory tweak, avoid static variable later