refactor for new format. Shiny, right?