new structure
new helper functions and tests