restructure for modularity