Added functions to perms module