the purpose of this interview was to determine if he has a mental disorder which had affected his behavior in connection with the offense for which he has been arrested , or might influence his potential for future violence , or for rehabilitation .