attorney represents the defendent in a trial