modified variable and fix misspeling