they studied the customs of foreign peoples , the governments of greek cities , the habits and internal organs of animals , the type and distribution of plants , and the history of science and philosophy .