I don't like this part. The name of the variable "padID" is here also used as the key. I haven't tried this, but this may cause problems or unexpected behaviour. Please rename the variable.