Added set_variable and get_variable methods. Example updated accordingly.