optimizing election get_perms