modified get_perms method to work with newer algorithm output