{"action":"created","comment":{"url":"https://api.github.com/repos/dimagi/commcare-odk/pulls/comments/50452715","id":50452715,"diff_hunk":"@@ -118,100 +132,113 @@ protected void deliverError(R receiver, Exception e) {\n \r\n     @Override\r\n     protected HttpCalloutOutcomes doSetupTaskBeforeRequest() {\r\n-        //This step needs to determine three things\r\n-        //1) Whether we are doing remote key management\r\n-        //2) Whether we should look for new key records\r\n-        //3) Whether we _need_ new key records, or can proceed without them\r\n-        //if the fetch fails.\r\n+        /**\r\n+         * This step needs to determine three things:\r\n+         * 1) Whether we are doing remote key management\r\n+         * 2) Whether we should look for new key records\r\n+         * 3) Whether we _need_ new key records, or can proceed without them if the fetch fails.\r\n+         */\r\n         \r\n-        //Otherwise, we're going to need to look through our key records, so \r\n-        //clean up the existing key records and make sure we're in a consistent state\r\n+        // Clean up the existing key records and make sure we're in a consistent state\r\n         cleanupUserKeyRecords();\r\n         \r\n-        //Now, see whether we have a valid record for this username/password combo\r\n-        \r\n+        // Now, see whether we have a valid record for this username/password/pin combo\r\n         boolean hasRecord = false;\r\n         userRecordExists = false;\r\n         UserKeyRecord valid = null;\r\n         \r\n         SqlStorage<UserKeyRecord> storage = app.getStorage(UserKeyRecord.class);\r\n-        for(UserKeyRecord ukr : storage.getRecordsForValue(UserKeyRecord.META_USERNAME, username)) {\r\n+        for (UserKeyRecord ukr : storage.getRecordsForValue(UserKeyRecord.META_USERNAME, username)) {\r\n             userRecordExists = true;\r\n-            \r\n-            if(!ukr.isPasswordValid(password)) {\r\n-                //This record is for a different password\r\n+\r\n+            if (!ukr.isPasswordOrPinValid(password, pin)) {\r\n                 continue;\r\n             }\r\n             \r\n-            //regardless of whether it's \"valid\", we have a record. \r\n+            // Regardless of whether it's \"valid\", we have a record\r\n             hasRecord = true;\r\n             \r\n-            //ok, now check whether this record is fully valid, or we need to look for an update\r\n-            if(ukr.isCurrentlyValid()) {\r\n+            // Now check whether this record is fully valid, or we need to look for an update\r\n+            if (ukr.isCurrentlyValid()) {\r\n                 valid = ukr;\r\n             }\r\n         }\r\n-        \r\n-        //If we don't have any records and we aren't doing remote key management, this is as\r\n-        //far as we're going\r\n-        if(!hasRecord && keyServerUrl == null) { return HttpCalloutOutcomes.Success;}\r\n \r\n-        //If we don't have any records, we need to do a callout\r\n-        calloutRequired = !hasRecord;\r\n-        \r\n-        calloutNeeded = (calloutRequired || valid == null) && keyServerUrl != null; \r\n+        if (!hasRecord && keyServerUrl == null) {\r\n+            // If we don't have any records and we aren't doing remote key management, this is as\r\n+            // far as we're going\r\n+            return HttpCalloutOutcomes.Success;\r\n+        }\r\n+\r\n+        /* Should only try to look for new records if ALL of the following are true:\r\n+         * a) We're in normal password login mode (otherwise, should only be try matching to an existing record on the device)\r\n+         * b) We didn't find a matching record that is valid\r\n+         * c) There is a keyServerUrl to make the http callout to */\r\n+        calloutNeeded = (loginMode == LoginActivity.LoginMode.PASSWORD)\r\n+                && (!hasRecord || valid == null)\r\n+                && keyServerUrl != null;\r\n         \r\n-        if(calloutNeeded) {\r\n-            Logger.log(AndroidLogger.TYPE_USER, \"Performing key record callout.\" + (calloutRequired ? \" Success is required for login\" : \"\"));\r\n+        if (calloutNeeded) {\r\n+            calloutSuccessRequired = !hasRecord;\r\n+            Logger.log(AndroidLogger.TYPE_USER, \"Performing key record callout.\" + (calloutSuccessRequired ? \" Success is required for login\" : \"\"));\r\n             this.publishProgress(Localization.get(\"key.manage.callout\"));\r\n         }\r\n         \r\n         return null;\r\n     }\r\n \r\n-    \r\n-    //Functionality that doesn't necessarily \"belong\" to this workflow:\r\n-\r\n     private void cleanupUserKeyRecords() {\r\n         UserKeyRecord currentlyValid = null;\r\n         //For all \"new\" entries: If there's another sandbox record (regardless of user)\r\n         //which shares the sandbox ID, we can set the status of the new record to be\r\n         //the same as the old record.\r\n         \r\n-        //TODO: We dont' need to read these records, we can read the metadata straight.\r\n         SqlStorage<UserKeyRecord> storage = app.getStorage(UserKeyRecord.class);\r\n-        for(UserKeyRecord record : storage) {\r\n-            if(record.getType() == UserKeyRecord.TYPE_NORMAL) {\r\n-                if(record.getUsername().equals(username) && record.isCurrentlyValid() && record.isPasswordValid(password)) {\r\n-                    if(currentlyValid == null) {\r\n-                        currentlyValid = record;\r\n-                    } else {\r\n-                        Logger.log(AndroidLogger.TYPE_ERROR_ASSERTION, \"User \" + username + \" has more than one currently valid key record!!\");\r\n-                    }\r\n-                }\r\n-            } else if(record.getType() == UserKeyRecord.TYPE_NEW) {\r\n-                //See if we have another sandbox with this ID that is fully initialized.\r\n-                if(storage.getIDsForValues(new String[] {UserKeyRecord.META_SANDBOX_ID, UserKeyRecord.META_KEY_STATUS}, new Object[] {record.getUuid(), UserKeyRecord.TYPE_NORMAL}).size() > 0) {\r\n-                    \r\n-                    Logger.log(AndroidLogger.TYPE_MAINTENANCE, \"Marking new sandbox \" + record.getUuid() + \" as initialized, since it's already in use on this device\");\r\n-                    //If so, this sandbox _has_ to have already been initialized, and we should treat it as such.\r\n-                    record.setType(UserKeyRecord.TYPE_NORMAL);\r\n-                    storage.write(record);\r\n+\r\n+        for (UserKeyRecord normalRecord :\r","path":"app/src/org/commcare/android/tasks/ManageKeyRecordTask.java","position":214,"original_position":214,"commit_id":"35198b099d5a642b1c2d585dcd80be6ba8f95c7a","original_commit_id":"35198b099d5a642b1c2d585dcd80be6ba8f95c7a","user":{"login":"amstone326","id":3723143,"avatar_url":"https://avatars.githubusercontent.com/u/3723143?v=3","gravatar_id":"","url":"https://api.github.com/users/amstone326","html_url":"https://github.com/amstone326","followers_url":"https://api.github.com/users/amstone326/followers","following_url":"https://api.github.com/users/amstone326/following{/other_user}","gists_url":"https://api.github.com/users/amstone326/gists{/gist_id}","starred_url":"https://api.github.com/users/amstone326/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amstone326/subscriptions","organizations_url":"https://api.github.com/users/amstone326/orgs","repos_url":"https://api.github.com/users/amstone326/repos","events_url":"https://api.github.com/users/amstone326/events{/privacy}","received_events_url":"https://api.github.com/users/amstone326/received_events","type":"User","site_admin":false},"body":"just refactored this to use getRecordsForValue() for each TYPE, rather than using if statements to check for each type","created_at":"2016-01-21T19:47:08Z","updated_at":"2016-01-21T19:47:08Z","html_url":"https://github.com/dimagi/commcare-odk/pull/979#discussion_r50452715","pull_request_url":"https://api.github.com/repos/dimagi/commcare-odk/pulls/979","_links":{"self":{"href":"https://api.github.com/repos/dimagi/commcare-odk/pulls/comments/50452715"},"html":{"href":"https://github.com/dimagi/commcare-odk/pull/979#discussion_r50452715"},"pull_request":{"href":"https://api.github.com/repos/dimagi/commcare-odk/pulls/979"}}},"pull_request":{"url":"https://api.github.com/repos/dimagi/commcare-odk/pulls/979","id":56180692,"html_url":"https://github.com/dimagi/commcare-odk/pull/979","diff_url":"https://github.com/dimagi/commcare-odk/pull/979.diff","patch_url":"https://github.com/dimagi/commcare-odk/pull/979.patch","issue_url":"https://api.github.com/repos/dimagi/commcare-odk/issues/979","number":979,"state":"open","locked":false,"title":"PIN auth","user":{"login":"amstone326","id":3723143,"avatar_url":"https://avatars.githubusercontent.com/u/3723143?v=3","gravatar_id":"","url":"https://api.github.com/users/amstone326","html_url":"https://github.com/amstone326","followers_url":"https://api.github.com/users/amstone326/followers","following_url":"https://api.github.com/users/amstone326/following{/other_user}","gists_url":"https://api.github.com/users/amstone326/gists{/gist_id}","starred_url":"https://api.github.com/users/amstone326/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amstone326/subscriptions","organizations_url":"https://api.github.com/users/amstone326/orgs","repos_url":"https://api.github.com/users/amstone326/repos","events_url":"https://api.github.com/users/amstone326/events{/privacy}","received_events_url":"https://api.github.com/users/amstone326/received_events","type":"User","site_admin":false},"body":"cross: https://github.com/dimagi/javarosa/pull/230, https://github.com/dimagi/commcare/pull/243, ","created_at":"2016-01-15T15:15:28Z","updated_at":"2016-01-21T19:47:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2eada2c917f8d423db44a7d83cf1e740ef425954","assignee":null,"milestone":{"url":"https://api.github.com/repos/dimagi/commcare-odk/milestones/6","html_url":"https://github.com/dimagi/commcare-odk/milestones/commcare_2.26","labels_url":"https://api.github.com/repos/dimagi/commcare-odk/milestones/6/labels","id":1429885,"number":6,"title":"commcare_2.26","description":null,"creator":{"login":"phillipm","id":94817,"avatar_url":"https://avatars.githubusercontent.com/u/94817?v=3","gravatar_id":"","url":"https://api.github.com/users/phillipm","html_url":"https://github.com/phillipm","followers_url":"https://api.github.com/users/phillipm/followers","following_url":"https://api.github.com/users/phillipm/following{/other_user}","gists_url":"https://api.github.com/users/phillipm/gists{/gist_id}","starred_url":"https://api.github.com/users/phillipm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phillipm/subscriptions","organizations_url":"https://api.github.com/users/phillipm/orgs","repos_url":"https://api.github.com/users/phillipm/repos","events_url":"https://api.github.com/users/phillipm/events{/privacy}","received_events_url":"https://api.github.com/users/phillipm/received_events","type":"User","site_admin":false},"open_issues":15,"closed_issues":91,"state":"open","created_at":"2015-11-25T18:23:45Z","updated_at":"2016-01-21T18:32:55Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/dimagi/commcare-odk/pulls/979/commits","review_comments_url":"https://api.github.com/repos/dimagi/commcare-odk/pulls/979/comments","review_comment_url":"https://api.github.com/repos/dimagi/commcare-odk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dimagi/commcare-odk/issues/979/comments","statuses_url":"https://api.github.com/repos/dimagi/commcare-odk/statuses/35198b099d5a642b1c2d585dcd80be6ba8f95c7a","head":{"label":"dimagi:pin-passwords","ref":"pin-passwords","sha":"35198b099d5a642b1c2d585dcd80be6ba8f95c7a","user":{"login":"dimagi","id":94514,"avatar_url":"https://avatars.githubusercontent.com/u/94514?v=3","gravatar_id":"","url":"https://api.github.com/users/dimagi","html_url":"https://github.com/dimagi","followers_url":"https://api.github.com/users/dimagi/followers","following_url":"https://api.github.com/users/dimagi/following{/other_user}","gists_url":"https://api.github.com/users/dimagi/gists{/gist_id}","starred_url":"https://api.github.com/users/dimagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimagi/subscriptions","organizations_url":"https://api.github.com/users/dimagi/orgs","repos_url":"https://api.github.com/users/dimagi/repos","events_url":"https://api.github.com/users/dimagi/events{/privacy}","received_events_url":"https://api.github.com/users/dimagi/received_events","type":"Organization","site_admin":false},"repo":{"id":20939877,"name":"commcare-odk","full_name":"dimagi/commcare-odk","owner":{"login":"dimagi","id":94514,"avatar_url":"https://avatars.githubusercontent.com/u/94514?v=3","gravatar_id":"","url":"https://api.github.com/users/dimagi","html_url":"https://github.com/dimagi","followers_url":"https://api.github.com/users/dimagi/followers","following_url":"https://api.github.com/users/dimagi/following{/other_user}","gists_url":"https://api.github.com/users/dimagi/gists{/gist_id}","starred_url":"https://api.github.com/users/dimagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimagi/subscriptions","organizations_url":"https://api.github.com/users/dimagi/orgs","repos_url":"https://api.github.com/users/dimagi/repos","events_url":"https://api.github.com/users/dimagi/events{/privacy}","received_events_url":"https://api.github.com/users/dimagi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dimagi/commcare-odk","description":"The best open source form management tool in town","fork":false,"url":"https://api.github.com/repos/dimagi/commcare-odk","forks_url":"https://api.github.com/repos/dimagi/commcare-odk/forks","keys_url":"https://api.github.com/repos/dimagi/commcare-odk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dimagi/commcare-odk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dimagi/commcare-odk/teams","hooks_url":"https://api.github.com/repos/dimagi/commcare-odk/hooks","issue_events_url":"https://api.github.com/repos/dimagi/commcare-odk/issues/events{/number}","events_url":"https://api.github.com/repos/dimagi/commcare-odk/events","assignees_url":"https://api.github.com/repos/dimagi/commcare-odk/assignees{/user}","branches_url":"https://api.github.com/repos/dimagi/commcare-odk/branches{/branch}","tags_url":"https://api.github.com/repos/dimagi/commcare-odk/tags","blobs_url":"https://api.github.com/repos/dimagi/commcare-odk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dimagi/commcare-odk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dimagi/commcare-odk/git/refs{/sha}","trees_url":"https://api.github.com/repos/dimagi/commcare-odk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dimagi/commcare-odk/statuses/{sha}","languages_url":"https://api.github.com/repos/dimagi/commcare-odk/languages","stargazers_url":"https://api.github.com/repos/dimagi/commcare-odk/stargazers","contributors_url":"https://api.github.com/repos/dimagi/commcare-odk/contributors","subscribers_url":"https://api.github.com/repos/dimagi/commcare-odk/subscribers","subscription_url":"https://api.github.com/repos/dimagi/commcare-odk/subscription","commits_url":"https://api.github.com/repos/dimagi/commcare-odk/commits{/sha}","git_commits_url":"https://api.github.com/repos/dimagi/commcare-odk/git/commits{/sha}","comments_url":"https://api.github.com/repos/dimagi/commcare-odk/comments{/number}","issue_comment_url":"https://api.github.com/repos/dimagi/commcare-odk/issues/comments{/number}","contents_url":"https://api.github.com/repos/dimagi/commcare-odk/contents/{+path}","compare_url":"https://api.github.com/repos/dimagi/commcare-odk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dimagi/commcare-odk/merges","archive_url":"https://api.github.com/repos/dimagi/commcare-odk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dimagi/commcare-odk/downloads","issues_url":"https://api.github.com/repos/dimagi/commcare-odk/issues{/number}","pulls_url":"https://api.github.com/repos/dimagi/commcare-odk/pulls{/number}","milestones_url":"https://api.github.com/repos/dimagi/commcare-odk/milestones{/number}","notifications_url":"https://api.github.com/repos/dimagi/commcare-odk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dimagi/commcare-odk/labels{/name}","releases_url":"https://api.github.com/repos/dimagi/commcare-odk/releases{/id}","created_at":"2014-06-17T21:17:26Z","updated_at":"2016-01-12T15:10:23Z","pushed_at":"2016-01-21T19:45:49Z","git_url":"git://github.com/dimagi/commcare-odk.git","ssh_url":"git@github.com:dimagi/commcare-odk.git","clone_url":"https://github.com/dimagi/commcare-odk.git","svn_url":"https://github.com/dimagi/commcare-odk","homepage":"https://play.google.com/store/apps/details?id=org.commcare.dalvik&hl=en","size":64480,"stargazers_count":5,"watchers_count":5,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":18,"forks":9,"open_issues":18,"watchers":5,"default_branch":"master"}},"base":{"label":"dimagi:master","ref":"master","sha":"5f7d6e0377958e867e5cdd1ebe82c7b1c86a68c0","user":{"login":"dimagi","id":94514,"avatar_url":"https://avatars.githubusercontent.com/u/94514?v=3","gravatar_id":"","url":"https://api.github.com/users/dimagi","html_url":"https://github.com/dimagi","followers_url":"https://api.github.com/users/dimagi/followers","following_url":"https://api.github.com/users/dimagi/following{/other_user}","gists_url":"https://api.github.com/users/dimagi/gists{/gist_id}","starred_url":"https://api.github.com/users/dimagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimagi/subscriptions","organizations_url":"https://api.github.com/users/dimagi/orgs","repos_url":"https://api.github.com/users/dimagi/repos","events_url":"https://api.github.com/users/dimagi/events{/privacy}","received_events_url":"https://api.github.com/users/dimagi/received_events","type":"Organization","site_admin":false},"repo":{"id":20939877,"name":"commcare-odk","full_name":"dimagi/commcare-odk","owner":{"login":"dimagi","id":94514,"avatar_url":"https://avatars.githubusercontent.com/u/94514?v=3","gravatar_id":"","url":"https://api.github.com/users/dimagi","html_url":"https://github.com/dimagi","followers_url":"https://api.github.com/users/dimagi/followers","following_url":"https://api.github.com/users/dimagi/following{/other_user}","gists_url":"https://api.github.com/users/dimagi/gists{/gist_id}","starred_url":"https://api.github.com/users/dimagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimagi/subscriptions","organizations_url":"https://api.github.com/users/dimagi/orgs","repos_url":"https://api.github.com/users/dimagi/repos","events_url":"https://api.github.com/users/dimagi/events{/privacy}","received_events_url":"https://api.github.com/users/dimagi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dimagi/commcare-odk","description":"The best open source form management tool in town","fork":false,"url":"https://api.github.com/repos/dimagi/commcare-odk","forks_url":"https://api.github.com/repos/dimagi/commcare-odk/forks","keys_url":"https://api.github.com/repos/dimagi/commcare-odk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dimagi/commcare-odk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dimagi/commcare-odk/teams","hooks_url":"https://api.github.com/repos/dimagi/commcare-odk/hooks","issue_events_url":"https://api.github.com/repos/dimagi/commcare-odk/issues/events{/number}","events_url":"https://api.github.com/repos/dimagi/commcare-odk/events","assignees_url":"https://api.github.com/repos/dimagi/commcare-odk/assignees{/user}","branches_url":"https://api.github.com/repos/dimagi/commcare-odk/branches{/branch}","tags_url":"https://api.github.com/repos/dimagi/commcare-odk/tags","blobs_url":"https://api.github.com/repos/dimagi/commcare-odk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dimagi/commcare-odk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dimagi/commcare-odk/git/refs{/sha}","trees_url":"https://api.github.com/repos/dimagi/commcare-odk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dimagi/commcare-odk/statuses/{sha}","languages_url":"https://api.github.com/repos/dimagi/commcare-odk/languages","stargazers_url":"https://api.github.com/repos/dimagi/commcare-odk/stargazers","contributors_url":"https://api.github.com/repos/dimagi/commcare-odk/contributors","subscribers_url":"https://api.github.com/repos/dimagi/commcare-odk/subscribers","subscription_url":"https://api.github.com/repos/dimagi/commcare-odk/subscription","commits_url":"https://api.github.com/repos/dimagi/commcare-odk/commits{/sha}","git_commits_url":"https://api.github.com/repos/dimagi/commcare-odk/git/commits{/sha}","comments_url":"https://api.github.com/repos/dimagi/commcare-odk/comments{/number}","issue_comment_url":"https://api.github.com/repos/dimagi/commcare-odk/issues/comments{/number}","contents_url":"https://api.github.com/repos/dimagi/commcare-odk/contents/{+path}","compare_url":"https://api.github.com/repos/dimagi/commcare-odk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dimagi/commcare-odk/merges","archive_url":"https://api.github.com/repos/dimagi/commcare-odk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dimagi/commcare-odk/downloads","issues_url":"https://api.github.com/repos/dimagi/commcare-odk/issues{/number}","pulls_url":"https://api.github.com/repos/dimagi/commcare-odk/pulls{/number}","milestones_url":"https://api.github.com/repos/dimagi/commcare-odk/milestones{/number}","notifications_url":"https://api.github.com/repos/dimagi/commcare-odk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dimagi/commcare-odk/labels{/name}","releases_url":"https://api.github.com/repos/dimagi/commcare-odk/releases{/id}","created_at":"2014-06-17T21:17:26Z","updated_at":"2016-01-12T15:10:23Z","pushed_at":"2016-01-21T19:45:49Z","git_url":"git://github.com/dimagi/commcare-odk.git","ssh_url":"git@github.com:dimagi/commcare-odk.git","clone_url":"https://github.com/dimagi/commcare-odk.git","svn_url":"https://github.com/dimagi/commcare-odk","homepage":"https://play.google.com/store/apps/details?id=org.commcare.dalvik&hl=en","size":64480,"stargazers_count":5,"watchers_count":5,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":18,"forks":9,"open_issues":18,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dimagi/commcare-odk/pulls/979"},"html":{"href":"https://github.com/dimagi/commcare-odk/pull/979"},"issue":{"href":"https://api.github.com/repos/dimagi/commcare-odk/issues/979"},"comments":{"href":"https://api.github.com/repos/dimagi/commcare-odk/issues/979/comments"},"review_comments":{"href":"https://api.github.com/repos/dimagi/commcare-odk/pulls/979/comments"},"review_comment":{"href":"https://api.github.com/repos/dimagi/commcare-odk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dimagi/commcare-odk/pulls/979/commits"},"statuses":{"href":"https://api.github.com/repos/dimagi/commcare-odk/statuses/35198b099d5a642b1c2d585dcd80be6ba8f95c7a"}}}}