Add get_variable method