adding restricted key access functionality