localizing var declarations