added comments on possible structural elements to keep track of modes and pin states