moved content type func to its own file