changes controller code to use contentId scope var