modified in applying permissions