new way of getting titles, doesn't need to read the whole document