better variable parsing