See my above comment about just taking the catalog_id as an argument.