Added some logic for titles