updates to classes and add tests for mapping