perms array trim