There's a lot of repetition between this function and the `getContentProfile` function. Can it be consolidated?