convert variables to dict