little refactore for permission library