Adding select and perms functions