implementing get_all_variable method