change var location, better obj size calculation