data functions to parse and summarise