refactor code, now run with 3 level category id params.