Question: what was john macgregor profession 
Answer: barrister
Answer sentence: john macgregor was a barrister by profession.