initial refactor to structure based system