add tests and split out methods for accessing details