JC: tested js code for pr category and sub category. spec passes.