better variable handling