restructure modules of resource