expand titles function