add generate title method