heavily rewritten with a more sensible data model