refactor code to add many content types