fix database to pg and add title helper