new structure and unit tests