restructure the solution for modularity