retrieving and parsing environments