added a Slim based api to return permutations