restructure into sub modules